home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-15 | 4.7 KB | 132 lines | [TEXT/MPS ] |
- /*------------------------------------------------------------------------------
- *
- * Apple Macintosh Developer Technical Support
- *
- * Installer 3.2 sample: adding an audit trail
- *
- * File: AddAuditTrail.r - Rez Source
- *
- * Modifications:
- * 5/19/93: RRK Changed Target file spec typeCrMustMatch flag setting to
- * typeCrNeedNotMatch and included comment that this will
- * allow the replacement of the target file if for some reason
- * the file or creator are different.
- * Used InstallerCommon.r defines.
- *
- * by: Jon Zap
- * updated for use with Installer 3.4 by: Rich Kubota 9/1/92
- *
- * Copyright © 1991 Apple Computer, Inc.
- * All rights reserved.
- *
- *------------------------------------------------------------------------------
- *
- * Install "TeachText" into the folder "Root":Installed Application and then
- * add an audit record to the system file.
- *----------------------------------------------------------------------------*/
-
- #include "InstallerTypes.r"
- #include "InstallerCommon.r"
-
- /* You can build and complete the script with the following lines:
- # Note: set up floppies with the appropriate names and contents before running scriptcheck
- # or set up folders with the same names and contents as the floppies
- # put these folders in the same folder as the script or at the root directory of same disk
- # For demonstration purposes, the application TeachText is used as the sample
- # application on a disk named "Program Disk". The script will install TeachText
- # into the folder "Installed Application:" at the root of the target disk.
-
- rez -o "AddAuditTrail" -t 'bbkr' -c 'bbkr' "AddAuditTrail.r"
- setfile -a i "AddAuditTrail" #mark Inited
- scriptcheck -p "AddAuditTrail"
- */
-
- /* Defines for the file spec atoms (specifications for source and destination files) */
- #define fsSourceProgram 2000
- #define fsTargetProgram 2001
- #define fsTargetSystem 2002
-
- /* This is the name of the source disk */
- #define ProgramDisk "Program Disk:"
-
- /* This is the target path for where we want to install the file. */
- #define TargetPath ":Installed Application:"
-
- /* Definition for the package. */
- #define pkTheProgram 3000
-
- /* Definition for the file atom */
- #define faProgram 4000
-
- /* Definition for the audit atom */
- #define atProgram 5000
- #define auditProgram 'MOOF'
- #define auditProgVer 2
-
- /***************************** Package Resources ************************************************/
- resource 'inpk' (pkTheProgram) {
- format0 {
- showsOnCustom, /* Package appears in the Custom Install display */
- removable, /* Package can be removed */
- dontForceRestart, /* adding an audit atom to system file doesn't require reboot */
- 0, /* 'icmt' not required */
- 0, /* Package size (filled in by ScriptCheck) */
- "The Program audit", { /* package name */
- 'infa', faProgram;
- 'inat', atProgram;
- }
- }
- };
-
- /********************************************* File Specs ***************************************/
- /* Source File Specs */
- resource 'infs' (fsSourceProgram) {
- 'APPL', /* File Type for TeachText */
- 'ttxt', /* Creator for TeachText for 7.0 */
- kScriptCheckSetsDate, /* ScriptCheck will fill in the creation date */
- noSearchForFile, /* Do not search the source disk for the file */
- typeCrMustMatch, /* file type and creator on this file must match */
- ProgramDisk"TeachText" /* Path to the file */
- };
-
- /* Target File Specs */
- resource 'infs' (fsTargetProgram) {
- 'APPL', /* File Type for TeachText */
- 'ttxt', /* Creator for TeachText for 7.0 */
- kNoDateStampCheck, /* creation date must be zero for target file spec */
- noSearchForFile, /* Do not search the target disk for the file */
- typeCrNeedNotMatch, /* file to be replaced even if F&C don't match */
- TargetPath"TeachText" /* installation Path */
- };
-
- resource 'infs' (fsTargetSystem) {
- 'ZSYS', /* File Type */
- 'MACS', /* Creator */
- kNoDateStampCheck, /* creation date must be zero for target file spec */
- noSearchForFile, /* Do not search the target disk for the file */
- typeCrNeedNotMatch, /* file to be matched by name even if F&C don't match */
- "special-macs:System" /* installation Path */
- };
-
- /***************************************** File Atoms ************************************************/
- resource 'infa' (faProgram) {
- format0 {
- StdRemLeaveNewerCopy, /* see InstallerCommon.r */
- fsTargetProgram, /* TARGET file spec */
- fsSourceProgram, /* SOURCE file spec */
- 0, /* atom size (filled in by ScriptCheck) */
- "" /* Atom Description (for a file Installer will use file name) */
- };
- };
-
- resource 'inat' (atProgram) {
- format0 {
- fsTargetSystem,
- auditProgram,
- auditProgVer
- };
- };
-
-
-
-